package com.ZengQi.event.controller;

import com.ZengQi.event.entity.Finish;
import com.ZengQi.event.entity.Topic;
import com.ZengQi.event.service.FinishService;
import com.ZengQi.event.service.TopicService;
import com.ZengQi.event.service.impl.FinishServiceImpl;
import com.ZengQi.event.service.impl.TopicServiceImpl;

import java.util.List;

public class UserFinishedViewController {
    private FinishService finishService=new FinishServiceImpl();
    private TopicService topicService=new TopicServiceImpl();

    public List<Finish> list(String finisher){
        Finish finish=new Finish();
        finish.setFinisher(finisher);
        List<Finish> finishedTopicByFinisher = finishService.findFinishedTopicByFinisher(finish);
        return finishedTopicByFinisher;
    }
    public List<Topic>topicList(String userName){
        Finish finish=new Finish();
        finish.setFinisher(userName);
        List<Topic> listTopic = topicService.findListFinish(finish);
        return listTopic;

    }
}
